package com.server.entity;

import java.io.Serializable;
import java.util.List;

import javax.persistence.*;
import javax.xml.bind.annotation.XmlRootElement;


/**
 * The persistent class for the ItemType database table.
 * 
 */
@Entity
@XmlRootElement
@Table(schema="mhp")
public class ItemType implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private String typeId;

	private String typeName;
	
	@ManyToOne(cascade={CascadeType.PERSIST,CascadeType.MERGE})
	@JoinColumn(name="CategoryId",insertable=false, updatable=false)
	private ItemCategory itemCategory;
	
	@OneToMany(mappedBy="itemType")
	private List<Item> items;

	public ItemType() {
	}

	public String getTypeId() {
		return this.typeId;
	}

	public void setTypeId(String typeId) {
		this.typeId = typeId;
	}

	public String getTypeName() {
		return this.typeName;
	}

	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}

}